package com.xh.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: XH
 * @Date: Created in 20:57 2021/10/16 0016
 */
@RestController
@RequestMapping("order")
public class TestController {
    @Autowired
    RestTemplate restTemplate;
    @RequestMapping("add")
    public String test(){
        String msg = restTemplate.getForObject("http://127.0.0.1:8082/stock/reduce", String.class);
        return "hello word" + msg;
    }
}
